﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Expression.Blend.SampleData.HelpMenu;
using Microsoft.Xna.Framework.Media;
using ActivityTracker.Library;
namespace ActivityTracker.Views.Help
{
    public partial class HelpMenu : PhoneApplicationPage
    {
        Data menu = new Data();
        public HelpMenu()
        {
            InitializeComponent();
            lbxHelpMenu.ItemsSource = menu.LoadMenuList();
        }
        void Help_Loaded(object sender, RoutedEventArgs e)
        {

            lbxHelpMenu.ItemsSource = menu.LoadMenuList(); 

        }
        

       

        private void helpbutton_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Views/Help/VideoHelp.xaml", UriKind.Relative));
        }

        private void lbxHelpMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
           
                if (lbxHelpMenu.SelectedIndex == -1)
                    return;
                NavigationService.Navigate(new Uri("/Views/Help/Help.xaml?id=" + (lbxHelpMenu.SelectedItem as MenuProperties).Id + "&url=" + (lbxHelpMenu.SelectedItem as MenuProperties).Url, UriKind.Relative));

            
        }
    }
}